﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Master/InSite.Master" CodeBehind="ContactUsManager.aspx.vb" Inherits="Core.ContactUsManager" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<style type="text/css" media="all">
		@import url(/static/inSite/css/redmond.datepick.css);
		.datepick-trigger{cursor:pointer;margin-bottom: -5px;}
</style>
<script src="/static/inSite/js/jquery.datepick.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $('#ctl00_ContentPlaceHolder1_txtStartDate').datepick({ showOnFocus: false, showTrigger: '<img src="/static/inSite/images/date.png" alt="..."></img>' });
        $('#ctl00_ContentPlaceHolder1_txtEndDate').datepick({ showOnFocus: false, showTrigger: '<img src="/static/inSite/images/date.png" alt="..."></img>' });
    });
</script>
<fieldset style="width:350px;margin: 0 auto;">
    <table width="100%">
        <tr>
            <td style="width:110px; color: #666666;">
                Email:
            </td>
            <td>
                <asp:TextBox ID="txtMail" class="mediumfield" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width:110px; color: #666666;">
                Từ ngày:
            </td>
            <td>
                <asp:TextBox ID="txtStartDate" class="smallfield" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width:110px; color: #666666;">
                Đến ngày:
            </td>
            <td>
                <asp:TextBox ID="txtEndDate" class="smallfield" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width:110px; color: #666666;">
                Trạng thái:
            </td>
            <td>
                <asp:DropDownList ID="cbxStatus" runat="server" CssClass="centerCbx" Width="218px"></asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <asp:Button ID="btnSearch" runat="server" Text="Tìm kiếm" class="button" Height="26px" />
            </td>
        </tr>
    </table>
</fieldset>
<br />
<fieldset>
    <legend>Danh sách thư từ khách hàng</legend>
    <asp:SqlDataSource ID="dsSource" runat="server"></asp:SqlDataSource>
    <asp:GridView ID="grid2" runat="server" class="tblMain" DataSourceID="dsSource"
            AutoGenerateColumns="false" GridLines="None" AllowPaging="true" DataKeyNames="ContactID" PageSize="20" AllowSorting="True"
            HeaderStyle-BackColor="#9097a9"> 
            <Columns>
                <asp:TemplateField HeaderText="No.">
                    <ItemTemplate>
                        <asp:Label Visible="false" runat="server" ID="lbl_ID" Text='<%#Eval("ContactID") %>'></asp:Label>
                        <asp:Label Visible="true" runat="server" ID="lblNo" Text='<%#Container.DataItemIndex + 1 %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle Width="30px" HorizontalAlign="Left" ForeColor="Black" />
                    <ItemStyle Width="30px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Người gửi">
                    <ItemTemplate>
                        <asp:Label Visible="true" runat="server" ID="lbl_Name" Text='<%#Eval("ContactName") %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle Width="150px" HorizontalAlign="Left" ForeColor="Black" />
                    <ItemStyle Width="150px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Email">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lbl_ContactMail" Text='<%#Eval("ContactMail") %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Ngày gửi">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lbl_ContactDate" Text='<%#formatTime(Eval("ContactDate")) %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle Width="110" HorizontalAlign="Left" />
                    <ItemStyle Width="110" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Trạng thái">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblContactStt" Text='<%#formatStatus(Eval("ContactStt")) %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle Width="100" HorizontalAlign="Center" />
                    <ItemStyle Width="100" HorizontalAlign="Center"/>
                </asp:TemplateField>
            </Columns>
        <PagerStyle HorizontalAlign="Center" />
    </asp:GridView>
</fieldset>
</asp:Content>
